﻿@using CashFlow.Web.Areas.SystemManage.Models.Shop.Result;
@{
    ViewBag.Title = "Index";
    var ls = ViewBag.ShopList as IList<ShopUserInfoModel>;
}
<style type="text/css">
    .shop-search {
        width: 90%;
        margin: 0px auto;
        margin-top: 10px;
    }

    .shop-search-table {
        width: 100%;
    }

        .shop-search-table td {
            padding: 5px;
        }
</style>
<div class="shop-search">
    <table align="center" class="shop-search-table">
        <tr>
            <td align="right" width="100">店铺名称:</td>
            <td colspan="2">
                <input type="text" class="layui-input" maxlength="11"
                       id="txt-Shop-Search-ShopName" />
            </td>
        </tr>
        <tr>
            <td>&nbsp;&nbsp;</td>
            <td align="left" width="100">
                <button type="button" id="btn-Shop-Search-Search"
                        class="layui-btn layui-btn-normal">
                    <i class="layui-icon layui-icon-search"></i>查 询
                </button>
            </td>
            <td align="left">
                <button type="button" id="btn-Shop-Search-NewShop"
                        class="layui-btn layui-btn-normal">
                    <i class="layui-icon layui-icon-add-1"></i>开出新店铺
                </button>
            </td>
        </tr>
    </table>
</div>
<style type="text/css">
    .shop-list {
        width: 90%;
        margin: 0px auto;
        padding: 20px 0px;
    }

    .shop-list-table {
        width: 100%;
        border: 1px solid #dddddd;
        margin-bottom: 20px;
    }

        .shop-list-table tr {
            border-bottom: 1px dashed #dddddd;
        }

        .shop-list-table td {
            padding: 5px;
            height: 20px;
            font-size: 16px;
        }
</style>
<div class="shop-list" id="ShopList">

</div>
<script type="text/html" id="ShopListTableDlg">
    <table align="center" class="shop-list-table">
        <tr>
            <td align="right" width="120">店铺名称:</td>
            <td>{{ShopName}}</td>
        </tr>
        <tr>
            <td align="right">店长:</td>
            <td>{{ShopManager}}</td>
        </tr>
        <tr>
            <td align="right">店铺编号:</td>
            <td>{{ShopNo}}</td>
        </tr>
        <tr>
            <td align="right">店铺成立时间:</td>
            <td>{{CreateTime}}</td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <a class="layui-btn layui-btn-sm layui-bg-purple view-ShopUsers"
                   tagUserId="{{ShopManagerUserId}}">查看店铺会员</a>
            </td>
        </tr>
    </table>
</script>
<style type="text/css">
    .newShopDlg-table {
        width: 100%;
        height: 100%;
    }

        .newShopDlg-table td {
            padding: 5px;
        }

    .newShopManager {
        color: red;
        font-size: 16px;
    }
</style>
<script type="text/html" id="NewShopDlg">
    <form class="layui-form" style="height: 100%;">
        <table align="center" class="newShopDlg-table">
            <tr>
                <td align="right" width="100">手机号码:</td>
                <td>
                    <input type="text" class="layui-input" maxlength="11"
                           lay-verify="required|phone" lay-vertype="tips"
                           lay-reqtext="请输入手机号码"
                           id="txt-NewShopDlg-Phone" />
                </td>
                <td>
                    <button type="button" id="btn-NewShopDlg-Search"
                            class="layui-btn layui-btn-normal">
                        <i class="layui-icon layui-icon-search"></i>搜索
                    </button>
                </td>
            </tr>
            <tr>
                <td align="right">新店长:</td>
                <td><label class="newShopManager" id="lb-NewShopDlg-NewShopManager">未选择！</label></td>
            </tr>
            <tr>
                <td align="right">新店铺名称:</td>
                <td>
                    <input type="text" class="layui-input" maxlength="10"
                           lay-verify="required|shopName" lay-vertype="tips"
                           lay-reqtext="请输入新店铺名称"
                           id="txt-NewShopDlg-ShopName" />
                </td>
            </tr>
            <tr>
                <td align="right">新店铺编号:</td>
                <td>
                    <input type="text" class="layui-input" maxlength="15"
                           lay-verify="required|shopNo" lay-vertype="tips"
                           lay-reqtext="请输入新店铺编号"
                           id="txt-NewShopDlg-ShopNo" />
                </td>
            </tr>
            <tr>
                <td align="right">&nbsp;&nbsp;</td>
                <td>
                    <button type="button" id="btn-NewShopDlg-OK"
                            class="layui-btn layui-btn-normal">
                        <i class="layui-icon layui-icon-add-1"></i>确 定
                    </button>
                </td>
            </tr>
        </table>
    </form>
</script>
<style type="text/css">
    .shopUsersDlg-table {
        width: 100%;
    }

        .shopUsersDlg-table td {
            padding: 5px;
        }

    .shopuser-list {
        width: 90%;
        margin: 0px auto;
        margin-top: 20px;
        padding-bottom: 20px;
    }

        .shopuser-list table:first-child {
            margin-top: 20px;
        }
</style>
<script type="text/html" id="ShopUsersDlg">
    <form class="layui-form">
        <table align="center" class="shopUsersDlg-table">
            <tr>
                <td align="right" width="100">姓名:</td>
                <td>
                    <input type="text" class="layui-input" id="txt-ShopUsersDlg-Name" />
                </td>
            </tr>
            <tr>
                <td align="right">手机号码:</td>
                <td>
                    <input type="text" class="layui-input" id="txt-ShopUsersDlg-Phone" />
                </td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;</td>
                <td>
                    <button type="button" id="btn-ShopUsersDlg-Search"
                            class="layui-btn layui-btn-normal">
                        <i class="layui-icon layui-icon-search"></i>查 询
                    </button>
                </td>
            </tr>
        </table>
    </form>

    <div class="shopuser-list" id="ShopUsersList"></div>
</script>
<style type="text/css">
    .shopUserListTableDlg-table {
        width: 100%;
        border: 1px solid #dddddd;
        margin-top: 20px;
    }

        .shopUserListTableDlg-table tr {
            border-bottom: 1px dashed #dddddd;
        }

        .shopUserListTableDlg-table td {
            padding: 5px;
            font-size: 14px;
        }
</style>
<script type="text/html" id="ShopUserListTableDlg">
    <table class="shopUserListTableDlg-table" align="center">
        <tr>
            <td align="right" width="100" valign="middle">姓名:</td>
            <td valign="middle">{{Name}}</td>
        </tr>
        <tr>
            <td align="right" valign="middle">手机号码:</td>
            <td valign="middle">{{Phone}}</td>
        </tr>
        <tr>
            <td align="right" valign="middle">邀请码:</td>
            <td valign="middle">{{InvitationCode}}</td>
        </tr>
        <tr>
            <td align="right" valign="middle">推荐人:</td>
            <td valign="middle">{{Reference}}</td>
        </tr>
        <tr>
            <td align="right" valign="middle">推荐人邀请码:</td>
            <td valign="middle">{{ReferenceInvitationCode}}</td>
        </tr>
    </table>
</script>
<script type="text/javascript" src="~/Static/Js/systemmanage/shop.js?rand=01"></script>